package net.towee.model.bittorrent;

import java.util.Date;

import com.google.gwt.user.client.rpc.IsSerializable;

/**
 * Interface that define pear data structure
 * @author c58
 */
public interface Peer extends IsSerializable  {
	/**
	 * @return id of peer
	 */
	String getId();
	
	/**
	 * @return ip of this peer
	 */
	String getIp();
	
	/**
	 * @return id of account
	 */
	String getAccountId();
	
	/**
	 * @return port of the peer
	 */
	int getPort();
	
	/**
	 * @return true if this peer is seeder, otherwise it's leecher
	 */
	boolean isSeeder();
	
	/**
	 * Set this peer as seeder
	 */
	void setSeeder();
	
	/**
	 * @return date of last announce request
	 */
	Date getLastRequestDate();
	
	/**
	 * set last request date
	 */
	void setLastRequestDate();
}
